<template>
  <div id="participate">  
   
   <div  style="display:flex;align-items: center;">
        <el-page-header @back="goBack"   content='' ></el-page-header>
        <img class="top_img" src="@/assets/images/a8.png" style="width:35px;height:35px;margin-right:10px;"/>
        <div style="line-height: 40px;font-weight:bold:">参与人数</div>
    </div> 
    <el-form ref="form"  label-width="70px">  

    <div style="display:flex;margin-top:10px;">
          <div style="flex:1;display:flex;align-items: center;">
            <el-form-item label="人数">
              <el-input v-model="meeting_ceremony_take_number" placeholder="请输入"  style="width:140px;"></el-input>
            </el-form-item>
            <div class="buttoon_box">
                <div class="buttoon_box_item"  style="margin-left:10px;background:#FFC600;color:white;" @click="num_but_qr()">确 定</div>  
            </div>
         </div>
     </div>

  </el-form >

  <div  style="display:flex;align-items: center;">
        <img class="top_img" src="@/assets/images/echarts_tb5.png" style="width:35px;height:35px;margin-right:10px;"/>
        <div style="line-height: 40px;font-weight:bold:">人员设置</div>
    </div> 

   <!-- 渲染数据list -->
   <div class="demo" :style="{  height: dtheight + 'px' }">
            <participate-list></participate-list>
   </div>
   

  </div>
</template>

<script>
import ParticipateList from '@/view/Activitynew/Meeting/ParticipateList'
export default {
  name: 'participate',
  data () {
    return {
        datalist:[],  
        form:{
            number:''
        },
        meeting_ceremony_take_number:0,
    }
  },
 components:{
      ParticipateList
  },
  created(){
       this.dtheight = window.innerHeight - 290
       this.num_fun()
  },
  mounted (){
    
  },
  methods: {
      num_fun(){
           this.post("/blind_box/takeNum", {
  
	         }).then(res => {
                this.meeting_ceremony_take_number = res.result.meeting_ceremony_take_number
                //console.log(res)
          })
      },
      num_but_qr(){
           this.post("/blind_box/setTakeNum", {
                  take_number:this.meeting_ceremony_take_number
                }).then(res => {
                    if(res.error_code == 0){
                    this.open1(res.result,'success')  //提示框
                    this.num_fun()
                    }else {
                    this.open1(res.message,'warning')
                }

        })
      },
      goBack() {
        this.$router.go(-1)
      },
  }
}
</script>


<style scoped>
.demo{
    overflow-y:auto;
}
.box{
    display: flex;
}

</style>
